/**
 *
 * @param array 源数组
 * @param desc 降序
 * @returns
 */
function selectSort(array: number[], desc: boolean = true): number[] {
  let index = 0;
  for (let index = 0; index < array.length; index++) {
    const element = array[index];
  }
  return [];
}

function demo() {
  //@ts-ignore
  const mockArray = Array.from(new Array(Math.pow(2, 6)), (item, index) => {
    return Math.ceil(Math.random() * 1000);
  });
  console.log(`排序结果：${selectSort(mockArray)}`);
}
export default {
  name: "选择排序",
  core: selectSort,
  event: demo,
};
